import request from '@/utils/request'
import { LoginResult, LoginData } from '@/types/login'
// 获取图形验证码
export const getPicCode = () => {
  return request<LoginResult>({
    method: 'GET',
    url: '/captcha/image'
  })
}
// 提交登录接口
export const login = (mobile:string, smsCode:string) => {
  return request<LoginData>({
    method: 'POST',
    url: '/passport/login',
    data: {
      form: { // 后端期望的参数容器
        isParty: false,
        mobile,
        partyData: {},
        smsCode
      }
    }
  })
}
